package com.sky.wsp.rabbitmq.po;


import java.io.Serializable;

/**
 * @desccription Mq消息对象
 * @auth wangshaopeng@talkweb.com.cn
 * @date 2022/9/30
 */
public class MqMessage<T> implements Serializable {

    private static final long serialVersionUID = -1694603681212972531L;

    MessageTypeEnum messageType;
    EventTypeEnum eventType;
    T data;

    public MqMessage() {
    }

    public MqMessage(MessageTypeEnum messageType) {
        this.messageType = messageType;
    }

    public MessageTypeEnum getMessageType() {
        return messageType;
    }

    public MqMessage setMessageType(MessageTypeEnum messageType) {
        this.messageType = messageType;
        return this;
    }

    public EventTypeEnum getEventType() {
        return eventType;
    }

    public MqMessage setEventType(EventTypeEnum eventType) {
        this.eventType = eventType;
        return this;
    }

    public T getData() {
        return data;
    }

    public MqMessage setData(T data) {
        this.data = data;
        return this;
    }

    @Override
    public String toString() {
        return "MqMessage{" +
                "messageType=" + messageType +
                ", eventType=" + eventType +
                ", data=" + data +
                '}';
    }
}
